home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club (Business) 1997 July / Software of the Month Club - Business (Volume 239) (July 1997).iso / pc / code / shared.dxr / 04433.ls next >
Encoding:
Text File  |  1996-02-21  |  1.9 KB  |  70 lines

  1. on duplicateCast movieFileName, firstCast, lastCast
  2.   set the colorDepth to 8
  3.   open(window movieFileName)
  4.   set gSourceWindow to window 1
  5.   if voidp(firstCast) then
  6.     set firstCast to 1
  7.   end if
  8.   if voidp(lastCast) then
  9.     tell gSourceWindow
  10.       set lastCast to the number of castMembers
  11.     end tell
  12.   end if
  13.   repeat with theCast = firstCast to lastCast
  14.     tell gSourceWindow
  15.       set theCastType to the castType of cast theCast
  16.     end tell
  17.     if theCastType = #bitmap then
  18.       tell gSourceWindow
  19.         set theCastPalette to the palette of cast theCast
  20.       end tell
  21.       puppetPalette(theCastPalette)
  22.       updateStage()
  23.     end if
  24.     tell gSourceWindow
  25.       copyToClipBoard(cast theCast)
  26.     end tell
  27.     pasteClipBoardInto(cast theCast)
  28.   end repeat
  29.   forget(window movieFileName)
  30.   put "Finished! Now duplicate the Score manually."
  31. end
  32.  
  33. on duplicateShared movieFileName, firstCast, lastCast
  34.   set the colorDepth to 8
  35.   open(window movieFileName)
  36.   set gSourceWindow to window 1
  37.   put "movie opened"
  38.   if voidp(firstCast) then
  39.     set firstCast to 1
  40.   end if
  41.   if voidp(lastCast) then
  42.     tell gSourceWindow
  43.       set lastCast to the number of castMembers
  44.     end tell
  45.     put "lastCast = ", lastCast
  46.   end if
  47.   repeat with theCast = firstCast to lastCast
  48.     tell gSourceWindow
  49.       set theCastType to the castType of cast theCast
  50.     end tell
  51.     if theCastType <> #empty then
  52.       if theCastType <> #digitalVideo then
  53.         if theCastType = #bitmap then
  54.           tell gSourceWindow
  55.             set theCastPalette to the palette of cast theCast
  56.           end tell
  57.           puppetPalette(theCastPalette)
  58.           updateStage()
  59.         end if
  60.         tell gSourceWindow
  61.           copyToClipBoard(cast theCast)
  62.         end tell
  63.         pasteClipBoardInto(cast theCast)
  64.       end if
  65.     end if
  66.   end repeat
  67.   forget(window movieFileName)
  68.   put "Finished! Now duplicate the Score manually."
  69. end
  70.